<?php

namespace App\Validators\Student;

use App\Validators\PassesValidator;
use \Prettus\Validator\Contracts\ValidatorInterface;
use \Prettus\Validator\LaravelValidator;

class StudentSchoolCensusValidator extends LaravelValidator
{
    use PassesValidator;
    protected $rulesMessages=[
        'change_date.required' => '变更时间是必填的',
        'after_change.required' => '变更后组织是必填的',
        'student_id.required'  => '学生ID是必传的',
    ];
    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
            'student_id'=>'required',
            'change_date'=>'required',
            'after_change'=>'required',
        ],
        ValidatorInterface::RULE_UPDATE => [],
   ];
}
